load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "release",
    srcs = ["releases.go"],
    embedsrcs = ["cockroach_releases.yaml"],
    importpath = "github.com/cockroachdb/cockroach/pkg/testutils/release",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/util/version",
        "@in_gopkg_yaml_v2//:yaml_v2",
    ],
)

go_test(
    name = "release_test",
    srcs = ["releases_test.go"],
    embed = [":release"],
    deps = [
        "//pkg/util/version",
        "@com_github_stretchr_testify//require",
    ],
)
